<template>
	<view>
		<uv-modal ref="modal" :title="form.title" showCancelButton @confirm="confirm" @cancel="cancel">
			<view class="slot-content">
				<rich-text :nodes="form.content"></rich-text>
			</view>
		</uv-modal>
	</view>
</template>

<script>
	export default {
		name: "showModel",
		props: {
			form: {
				type: Object,
				default: {
					title: "温馨提示",
					type: "1",
					content:"这是一个提示框"
				}
			},
			show:{
				type:Boolean,
				default:false
			}
		},
		watch:{
			show(){
				if(this.$props.show){
					this.$refs.modal.open();
				}else{
					this.$refs.modal.close();
				}
			}
		},
		data() {
			return {
				iconList:[
					{
						type:"1",//成功
						icon:"checkmark-circle",
						color:"#3c9cff"
					},
					{
						type:"0",//失败
						icon:"checkmark-circle",
						color:"#f56c6c"
					},
					{
						type:"2",//进行
						icon:"checkmark-circle",
						color:"#f9ae3d"
					},
					{
						type:"-1",//警告
						icon:"checkmark-circle",
						color:"#5ac725"
					},
					,
					{
						type:"999",//默认
						icon:"checkmark-circle",
						color:""
					}
				]
			};
		},
		methods:{
			confirm(){
				
			},
			cancel(){
				
			}
		}
	}
</script>

<style>

</style>